import request from '../utils/request'
export interface ICountAndLimitNum{
    count:number
    limitNum:number
}

export const getProList = (data:ICountAndLimitNum) =>{
    return request({
        url: '/pro/list',
        method: 'GET',
        data
    })
}
// 获取分类数据
export const getCategoryListReq = () => {
    return request({
      url: '/pro/getCategory',
      method: 'GET'
    })
  }
  // 筛选的接口
  export const getSearchListReq = (data: { category: string, search: string }) => {
    return request({
      url: '/pro/searchPro',
      method: 'POST',
      data
    })
  }
  //秒杀和推荐
  export const getRecommendOrSeckillListReq = (data: { type: string, flag: number}) => {
    return request({
      url: '/pro/showdata',
      method: 'POST',
      data
    })
  }
  export const updataRecommendOrSeckillListReq = (data: { proid:string, type:string, flag:string}) => {
    return request({
      url: '/pro/updateFlag',
      method: 'POST',
      data
    })
  }